﻿<Application x:Class="Antix.Mail.Smtp.Impostor.Client.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:Antix.Mail.Smtp.Impostor.Client"
             StartupUri="MainWindow.xaml">
    <Application.Resources>
        <BitmapImage x:Key="StoppedImage" UriSource="Graphics/Stopped.png" />
        <BitmapImage x:Key="StartedImage" UriSource="Graphics/Started.png" />
        <BitmapImage x:Key="ReceivingImage" UriSource="Graphics/Receiving.png" />
        <BitmapImage x:Key="EmailImage" UriSource="Graphics/Email.png" />
        <BitmapImage x:Key="SettingsImage" UriSource="Graphics/Settings.png" />
        <BitmapImage x:Key="AddImage" UriSource="Graphics/Add.png" />
        <BitmapImage x:Key="CloseImage" UriSource="Graphics/Close.png" />

        <Style x:Key="columnHeaderStyle" TargetType="{x:Type GridViewColumnHeader}">
            <Setter Property="Padding" Value="4" />
            <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        </Style>

        <Style x:Key="labelStyle" TargetType="Label">
            <Setter Property="HorizontalContentAlignment" Value="Right" />
            <Setter Property="Margin" Value="5,2" />
        </Style>

        <Style x:Key="textStyle" TargetType="TextBox">
            <Setter Property="HorizontalAlignment" Value="Left" />
            <Setter Property="Margin" Value="5,2" />
            <Style.Triggers>
                <Trigger Property="Validation.HasError" Value="true">
                    <Setter Property="ToolTip"
                        Value="{Binding RelativeSource={x:Static RelativeSource.Self},
                        Path=(Validation.Errors)[0].ErrorContent}"/>
                </Trigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="buttonStyle" TargetType="Button">
            <Setter Property="HorizontalAlignment" Value="Left" />
            <Setter Property="Margin" Value="5,2" />
        </Style>

        <ControlTemplate x:Key="validationTemplate">
            <DockPanel>
                <TextBlock Foreground="Red" FontSize="20">!</TextBlock>
                <AdornedElementPlaceholder/>
            </DockPanel>
        </ControlTemplate>
        
        <DataTemplate x:Key="columnHeader">
            <StackPanel>
                <TextBlock Text="{Binding}"/>
            </StackPanel>
        </DataTemplate>
        <DataTemplate x:Key="columnHeaderAscending">
            <DockPanel>
                <Path DockPanel.Dock="Right" x:Name="arrow" Fill="Black" Opacity=".25" Data="M 5,9 L 15,9 L 10,4 L 5,9" />
                <TextBlock Text="{Binding}"/>
            </DockPanel>
        </DataTemplate>
        <DataTemplate x:Key="columnHeaderDescending">
            <DockPanel>
                <Path DockPanel.Dock="Right" x:Name="arrow" Fill="Black" Opacity=".25" Data="M 5,9 L 10,14 L 15,9 L 5,9" />
                <TextBlock Text="{Binding}" />
            </DockPanel>
        </DataTemplate>

        <ControlTemplate x:Key="ExpanderToggleButton"
                 TargetType="{x:Type ToggleButton}" />
    </Application.Resources>
</Application>